#!/bin/sh
# Raster_PDF_DJVU_Convert_1.sh ( 7 )
File1="$1" ;
if [ "$TMPDIR" = "" ] ;
then
TMPDIR=/tmp ;
fi ;
tmpname="$TMPDIR/Electric_Document_$$.tmp" ;
mkdir -p "$tmpname" ;
pdfimages "$File1" "$tmpname"/page ;
Count1=0 ;
for file in "$tmpname"/page-???.pbm ;
do
	Count1=`expr $Count1 + 1` ;
	cjb2 -dpi 600 "$file" "$tmpname"/Page_`printf "%04d" $Count1`.C.djvu ;
done ;
djvm -c "$2" "$tmpname"/Page_????.C.djvu ;
rm -r "$tmpname" ;

